package com.spring;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @Author: Asuka
 * @Description:
 * @create: 2025-04-12 21:49
 */


public class BeanFactory {

    private ConcurrentHashMap<String, Object> beanMap = new ConcurrentHashMap<>();


    public void registerBean(String name, Object bean) {
        beanMap.put(name, bean);
    }

    public Object getBean(String name) {
        return beanMap.get(name);
    }




}
